package com.huazi.user.registration.dao.imp;

import com.huazi.user.registration.dao.InsertGuahao;
import com.huazi.user.registration.tool.BaseDao;

import java.util.Map;

/**
 * 插入挂号信息的方法
 */
public  class InsertGuahaoImpl extends BaseDao implements InsertGuahao {
    @Override
    public Integer insertGua(Integer UserId, String UserName, Integer doctorId, String time) {
        String sql = ("INSERT INTO `doctor_queue` VALUES(DEFAULT,?,?,?,?,DEFAULT)");
        String sqls = "INSERT INTO consumeinfo(id,cardNo,consumeType,drugType,times,money) VALUES (DEFAULT,?,'挂号','挂号的费用',?,3)";
        executeUpdate(sqls, UserId, time);
        String sqlss = "insert INTO user_orderinfo(`id`,`user_carid`,office,doctor_id,times)  VALUES(default,?,?,?,?);";
        executeUpdate(sqlss, UserId, "外科", doctorId, time);
        return executeUpdate(sql, UserId, UserName, doctorId, time);
    }



}
